package com.shallowUniverse.dmp.entity;

import java.util.HashMap;

/**
 * @author Shuai Guo
 * @version 1.0
 * @description
 * @date 2021/8/5
 */
public class Result<T> extends HashMap<String, Object> {

    private T data;
    private String msg;
    private Integer code;

    public Result() {
    }

    public Result(T data) {
        this.put("data", data);
    }

    public Result<T> setCode(Integer code) {
        this.put("code", code);
        return this;
    }

    public Result<T> setMsg(String msg) {
        this.put("msg", msg);
        return this;
    }
}
